package com.gyhj.questionaires.controller;

import com.gyhj.questionaires.config.Response;
import com.gyhj.questionaires.model.entity.QuestionAiresEntity;
import com.gyhj.questionaires.service.QuestionAiresEntityService;
import javax.validation.Valid;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <h1>
 * 问卷调查Controller
 * </h1>
 *
 * @author MarkerCCC
 * @date 2020/4/14 - 15:09
 * @since 2020/4/14 - 15:09 星期二 by MarkerCCC markerccc@163.com
 */
@Slf4j
@RestController
@RequiredArgsConstructor
@RequestMapping("/questionAiresEntityController")
public class QuestionAiresEntityController {

    private final QuestionAiresEntityService questionAiresEntityService;

    @PostMapping("/saveQuestionAiresEntity")
    public Response<Boolean> saveQuestionAiresEntity(@RequestBody @Valid QuestionAiresEntity questionAiresEntity) {
        Boolean success = questionAiresEntityService.saveQuestionAiresEntity(questionAiresEntity);
        return Response.data(success);
    }
}
